#pragma once
#include "FoGGeDef.h"
#include "GameModuleDependence.h"
namespace _MODULE_
{
	namespace _GAME_
	{
		class TriggerListener
		{
		public:
			TriggerListener(void);
			~TriggerListener(void);

			void SetName(_FO_UTIL::Name& name);
			void SetName(_FOGGE_::foString& name);
			void SetName(LPCTSTR name);

			const _FO_UTIL::Name& GetTagName() const
			{
				return m_nameTag;
			}


			static void TriggerEvent(_FO_UTIL::Name name,_P_GAME::GamePart* Instigator);
			
		protected:
			virtual void Trigger(_P_GAME::GamePart* Instigator)
			{
			}

		private:
			void RemoveFromTriggerMap();
			void InsertToTriggerMap();

			_FO_UTIL::Name m_nameTag;

			static std::multimap<_FO_UTIL::Name,TriggerListener*> s_mmapTriggerListener;


		};
	}
}